;; (Convolution in kernel framesize)

;; Strict convolution.

;; in        - processing target
;; kernel    - processing kernel.
;; framesize - size of FFT frame, must be a power of two

(let ((input (AudioIn.ar '(1 2)))
      (kernel (WhiteNoise.ar)))
  (Convolution.ar input kernel 2048 0.1))

(let* ((a 2048)
       (b (buffer-alloc a))
       (i (buffer-id b)))
  (-> "/b_set" i 0 1.0)
  (iterate 100 (lambda () (-> "/b_set" i (random-integer a) (random 1.0))))
  (Convolution.ar 
   (AudioIn.ar '(1 2)) 
   (PlayBuf.ar 1 i (BufRateScale.kr i) 1 0 1)
   (* 2 a)
   0.2))
